class Solution {
public:
    int mostWordsFound(vector<string>& sentences) {
        int res = 0;
        for (auto & s : sentences) {
            stringstream sin(s);
            string str;
            int cnt = 0;
            while (sin >> str) cnt ++ ;
            res = max(res, cnt);
        }
        return res;
    }
};
